package com;

import com.service.EsRestTemplateService;
import com.service.RepositoryService;
import com.service.RestHighLevelClientServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

//Spring Boot整合的时候可以不添加EnableElasticsearchRepositories
@SpringBootApplication
public class Ch09Application implements CommandLineRunner {
    public static void main(String[] args) {
        SpringApplication.run(Ch09Application.class,args);
    }

    @Autowired
    private RestHighLevelClientServiceImpl restHighLevelClientService;

    @Autowired
    private EsRestTemplateService esRestTemplateService;

    @Autowired
    private RepositoryService repositoryService;


    @Override
    public void run(String... args) throws Exception {
       // restHighLevelClientService.doSth();
       // restHighLevelClientService.doSth();
        repositoryService.doSth();
    }
}
